<script>
var i=10;
while(i>=0){
  document.write(i+" ");
  i-=2;
}
</script>